Repository navigation
docs(examples): add workflow_chain.py — t2i → i2i → i2v API demo - #129
Merged
Merged
Conversation
…ession
Lifts the proven 3-step in-process chain from the gflow-cli-remotion
promo harness into a clean developer-facing example. Demonstrates the
in-process FlowApiClient pattern for composing image and video surfaces:
1. generate_image (t2i) -> initial frame
2. generate_image (i2i, ref=t2i) -> end frame in same style
3. generate_video (i2v, start=t2i, -> 8s interpolation
end=i2i)
Codifies the three asymmetries every direct-API caller hits:
- Aspect / Model / VideoModel: use `from_cli(...)`, not the bare
constructor (the StrEnum value is the wire format, e.g.
`IMAGE_ASPECT_RATIO_PORTRAIT`).
- `client.download_image(image, target)` returns the actual saved
path — `paths.correct_image_extension()` may rename post-write if
Flow served a different format than the requested extension. The
i2i `ref_paths` and i2v `start_image` / `end_image` must use the
real returned path.
- `generate_video` does NOT accept `project_id` (unlike
`generate_image`); the transport derives project context from the
current session.
Defaults to a minimalist stickman dawn subject so the example is
runnable end-to-end without supplying prompts. The motion prompt
anchors visual style explicitly ("Maintain exact 2D black ink line-art
style, same characters as start/end frame") — without this anchor Veo
omni-flash drifts into a 3D photoreal aesthetic regardless of the ref
frames (diagnosed via master.mp4 review of the wf-004 paid capture).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
omni-flash does not support i2v interpolation — it silently drops the start/end frames and produces a text-only video (gflow-cli #125, fixed in #128). The example's --video-model now defaults to veo-lite, and the help text documents the constraint. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
15990166686ll-crypto
pushed a commit
to 15990166686ll-crypto/gflow-cli
that referenced
this pull request
Aug 24, 2026
…ow-chain docs(examples): add workflow_chain.py — t2i → i2i → i2v API demo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
examples/workflow_chain.py— a runnable, developer-facing demo of the in-processFlowApiClientt2i → i2i → i2v chain in one Flow session. Codifies the three in-process gotchas (Aspect.from_cli,download_imagereturns the actual path,generate_videohas noproject_id).Defaults to
--video-model veo-lite— omni-flash does NOT support i2v interpolation (it silently routes to T2V; gflow-cli #125, fixed in #128). The i2v phase works correctly now that #128 is on develop.Lift of the proven chain from the gflow-cli-remotion promo harness, stripped of all OBS/Remotion/sentinel machinery (pure API). README updated.
🤖 Generated with Claude Code